Skip to content

Conversation

@ogenstad
Copy link
Contributor

@ogenstad ogenstad commented Aug 22, 2025

Summary by CodeRabbit

  • New Features
    • No user-facing changes in this release.
  • Chores
    • Updated linting configuration to flag unnecessary dict() calls, improving code quality and consistency. This may surface new warnings locally and in CI, with no runtime impact.
  • Tests
    • Adjusted a unit test to use {} for empty dictionaries, maintaining behavior and coverage while aligning with linting standards.

@coderabbitai
Copy link

coderabbitai bot commented Aug 22, 2025

Walkthrough

The pull request updates configuration and tests. In pyproject.toml, C408 was removed from the [tool.ruff.lint.ignore] list, enabling Ruff to report Unnecessary dict call findings. In tests/unit/sdk/test_topological_sort.py, a test input was changed from dict() to {} in test_topological_sort_empty to comply with the active rule. No production code, APIs, or runtime behavior were modified.

Tip

🔌 Remote MCP (Model Context Protocol) integration is now available!

Pro plan users can now connect to remote MCP servers from the Integrations page. Connect with popular remote MCPs such as Notion and Linear to add more context to your reviews and chats.


📜 Recent review details

Configuration used: CodeRabbit UI

Review profile: CHILL

Plan: Pro

💡 Knowledge Base configuration:

  • MCP integration is disabled by default for public repositories
  • Jira integration is disabled by default for public repositories
  • Linear integration is disabled by default for public repositories

You can enable these sources in your CodeRabbit configuration.

📥 Commits

Reviewing files that changed from the base of the PR and between 545956a and 076d477.

📒 Files selected for processing (2)
  • pyproject.toml (0 hunks)
  • tests/unit/sdk/test_topological_sort.py (1 hunks)
💤 Files with no reviewable changes (1)
  • pyproject.toml
🧰 Additional context used
🧬 Code graph analysis (1)
tests/unit/sdk/test_topological_sort.py (1)
infrahub_sdk/topological_sort.py (1)
  • topological_sort (20-40)
⏰ Context from checks skipped due to timeout of 90000ms. You can increase the timeout in your CodeRabbit configuration to a maximum of 15 minutes (900000ms). (6)
  • GitHub Check: unit-tests (3.9)
  • GitHub Check: integration-tests-latest-infrahub
  • GitHub Check: unit-tests (3.13)
  • GitHub Check: unit-tests (3.12)
  • GitHub Check: unit-tests (3.10)
  • GitHub Check: unit-tests (3.11)
🔇 Additional comments (1)
tests/unit/sdk/test_topological_sort.py (1)

7-7: No further dict(), list(), or tuple() calls remain; existing set() usages are intentional

All literalizable no-argument calls flagged by C408 have been replaced or don’t apply. The only remaining zero-argument calls in the repo are set(), which is the correct way to create an empty set (no empty-set literal exists):

  • infrahub_sdk/transfer/schema_sorter.py:24 → relationship_graph[node_schema.kind] = set()
  • infrahub_sdk/topological_sort.py:27 → dependency_dict_to_sort.update({missing_key: set() for missing_key in missing_dependent_keys})

Ruff confirms there are no outstanding C408 violations.

✨ Finishing Touches
  • 📝 Generate Docstrings
🧪 Generate unit tests
  • Create PR with unit tests
  • Post copyable unit tests in a comment
  • Commit unit tests in branch pog-408

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share
🪧 Tips

Chat

There are 3 ways to chat with CodeRabbit:

  • Review comments: Directly reply to a review comment made by CodeRabbit. Example:
    • I pushed a fix in commit <commit_id>, please review it.
    • Open a follow-up GitHub issue for this discussion.
  • Files and specific lines of code (under the "Files changed" tab): Tag @coderabbitai in a new review comment at the desired location with your query.
  • PR comments: Tag @coderabbitai in a new PR comment to ask questions about the PR branch. For the best results, please provide a very specific query, as very limited context is provided in this mode. Examples:
    • @coderabbitai gather interesting stats about this repository and render them as a table. Additionally, render a pie chart showing the language distribution in the codebase.
    • @coderabbitai read the files in the src/scheduler package and generate a class diagram using mermaid and a README in the markdown format.

Support

Need help? Create a ticket on our support page for assistance with any issues or questions.

CodeRabbit Commands (Invoked using PR/Issue comments)

Type @coderabbitai help to get the list of available commands.

Other keywords and placeholders

  • Add @coderabbitai ignore anywhere in the PR description to prevent this PR from being reviewed.
  • Add @coderabbitai summary or Summary to generate the high-level summary at a specific location in the PR description.
  • Add @coderabbitai anywhere in the PR title to generate the title automatically.

CodeRabbit Configuration File (.coderabbit.yaml)

  • You can programmatically configure CodeRabbit by adding a .coderabbit.yaml file to the root of your repository.
  • Please see the configuration documentation for more information.
  • If your editor has YAML language server enabled, you can add the path at the top of this file to enable auto-completion and validation: # yaml-language-server: $schema=https://coderabbit.ai/integrations/schema.v2.json

Status, Documentation and Community

  • Visit our Status Page to check the current availability of CodeRabbit.
  • Visit our Documentation for detailed information on how to use CodeRabbit.
  • Join our Discord Community to get help, request features, and share feedback.
  • Follow us on X/Twitter for updates and announcements.

@cloudflare-workers-and-pages
Copy link

Deploying infrahub-sdk-python with  Cloudflare Pages  Cloudflare Pages

Latest commit: 076d477
Status: ✅  Deploy successful!
Preview URL: https://5494b6e1.infrahub-sdk-python.pages.dev
Branch Preview URL: https://pog-408.infrahub-sdk-python.pages.dev

View logs

@codecov
Copy link

codecov bot commented Aug 22, 2025

Codecov Report

✅ All modified and coverable lines are covered by tests.

@@           Coverage Diff            @@
##           develop     #505   +/-   ##
========================================
  Coverage    75.74%   75.74%           
========================================
  Files          100      100           
  Lines         8846     8846           
  Branches      1732     1732           
========================================
  Hits          6700     6700           
  Misses        1670     1670           
  Partials       476      476           
Flag Coverage Δ
integration-tests 34.65% <ø> (ø)
python-3.10 48.21% <ø> (ø)
python-3.11 48.19% <ø> (-0.03%) ⬇️
python-3.12 48.16% <ø> (ø)
python-3.13 48.19% <ø> (ø)
python-3.9 46.86% <ø> (ø)
python-filler-3.12 25.09% <ø> (ø)

Flags with carried forward coverage won't be shown. Click here to find out more.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

@ogenstad ogenstad requested a review from a team August 22, 2025 14:21
@dgarros dgarros merged commit 8310a3e into develop Aug 24, 2025
21 checks passed
@dgarros dgarros deleted the pog-408 branch August 24, 2025 13:33
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants